/*---------------------------------------------------------------------------------------------
 *  Copyright (c) Microsoft Corporation. All rights reserved.
 *  Licensed under the MIT License. See License.txt in the project root for license information.
 *--------------------------------------------------------------------------------------------*/

/* --- Registered servers tree viewlet --- */
.server-explorer-viewlet .monaco-tree .monaco-tree-row .content .server-group,
.server-explorer-viewlet .monaco-list .monaco-list-row .content .server-group {
	cursor: default;
	width: 100%;
	display: flex;
	align-items: center;
}

/* Bold font style does not go well with CJK fonts */
.server-explorer-viewlet:lang(zh-Hans) .monaco-tree .monaco-tree-row .server-group,
.server-explorer-viewlet:lang(zh-Hant) .monaco-tree .monaco-tree-row .server-group,
.server-explorer-viewlet:lang(ja) .monaco-tree .monaco-tree-row .server-group,
.server-explorer-viewlet:lang(ko) .monaco-tree .monaco-tree-row .server-group,
.server-explorer-viewlet:lang(zh-Hans) .monaco-list .monaco-list-row .server-group,
.server-explorer-viewlet:lang(zh-Hant) .monaco-list .monaco-list-row .server-group,
.server-explorer-viewlet:lang(ja) .monaco-list .monaco-list-row .server-group,
.server-explorer-viewlet:lang(ko) .monaco-list .monaco-list-row .server-group {
	font-weight: normal;
}

/* High Contrast Theming */
.monaco-workbench.hc-light .server-explorer-viewlet .server-group,
.monaco-workbench.hc-black .server-explorer-viewlet .server-group {
	line-height: 20px;
}

.monaco-workbench > .activitybar .monaco-action-bar .action-label.serverTree {
	background-size: 22px;
	background-repeat: no-repeat;
	background-position: 50% !important;
}

.server-explorer-viewlet .object-explorer-view {
	height: 100%;
}

.server-explorer-viewlet .server-group {
	height: 23px;
	line-height: 23px;
	color: #ffffff;
}

/* Add space beneath the button */
.new-connection .monaco-text-button {
	margin-bottom: 2px;
}

/* display action buttons on hover */
.server-explorer-viewlet .monaco-tree .monaco-tree-row > .content,
.server-explorer-viewlet .monaco-list .monaco-list-row {
	display: flex;
}

.server-explorer-viewlet .monaco-tl-row {
	width: 100%;
}

/* Added to display the tree in connection dialog */
.server-explorer-viewlet {
	height: 100%;
}

.explorer-servers {
	height: 100%;
}

/* search box */
.server-explorer-viewlet .search-box {
	padding-bottom: 4px;
	margin: auto;
	width: 95%;
}

/* OE and connection element group */
.monaco-tree .monaco-tree-rows > .monaco-tree-row > .content > .connection-tile,
.monaco-tree .monaco-tree-rows > .monaco-tree-row > .content > .object-element-group,
.monaco-list .monaco-list-rows > .monaco-list-row .connection-tile,
.monaco-list .monaco-list-rows > .monaco-list-row .object-element-group {
	padding-left: 5px;
	padding-right: 5px;
	padding-top: 3px;
	padding-bottom: 3px;
	overflow: hidden;
}

/* OE server group */
.monaco-tree .monaco-tree-rows > .monaco-tree-row > .content.server-group,
.monaco-tree .monaco-tree-rows > .monaco-tree-row > .content.server-group > .server-group {
	padding-left: 5px;
}

.monaco-tree .monaco-tree-rows > .monaco-tree-row > .content.server-group {
	padding-right: 5px;
	padding-top: 5px;
}

.monaco-tree .monaco-tree-rows > .monaco-tree-row > .content.server-group > .server-group > .name {
	text-overflow: ellipsis;
	overflow: hidden;
}


/* OE and connection label */
.monaco-tree .monaco-tree-rows > .monaco-tree-row > .content > .connection-tile > .label,
.monaco-tree .monaco-tree-rows > .monaco-tree-row > .content > .object-element-group > .label,
.monaco-list .monaco-list-rows > .monaco-list-row .connection-tile > .label,
.monaco-list .monaco-list-rows > .monaco-list-row .object-element-group > .label {
	text-overflow: ellipsis;
	overflow: hidden;
}

/* OE and connection icon */
.monaco-tree .monaco-tree-rows > .monaco-tree-row > .content > .connection-tile > .icon,
.monaco-tree .monaco-tree-rows > .monaco-tree-row > .content > .object-element-group > .icon,
.monaco-list .monaco-list-rows > .monaco-list-row .connection-tile > .icon,
.monaco-list .monaco-list-rows > .monaco-list-row .object-element-group > .icon {
	float: left;
	height: 16px;
	width: 16px;
	padding-right: 10px;
}

.monaco-tree .monaco-tree-rows > .monaco-tree-row > .content > .connection-tile > .icon.server-page,
.hc-light .monaco-tree .monaco-tree-rows > .monaco-tree-row > .content > .connection-tile > .icon.server-page,
.monaco-list .monaco-list-rows > .monaco-list-row .connection-tile > .icon.server-page,
.hc-light .monaco-list .monaco-list-rows > .monaco-list-row .connection-tile > .icon.server-page,
.monaco-tree .monaco-tree-rows > .monaco-tree-row > .content > .connection-profile-container > .icon.server-page,
.hc-light .monaco-tree .monaco-tree-rows > .monaco-tree-row > .content > .connection-profile-container > .icon.server-page,
.monaco-list .monaco-list-rows > .monaco-list-row .connection-profile-container > .icon.server-page,
.hc-light .monaco-list .monaco-list-rows > .monaco-list-row .connection-profile-container > .icon.server-page {
	background-image: url('default_server.svg');
}

.monaco-list:focus .monaco-list-rows > .monaco-list-row.selected .connection-profile-container > .icon.server-page,
.hc-light .monaco-list:focus .monaco-list-rows > .monaco-list-row.selected .connection-profile-container > .icon.server-page {
	background-image: url('default_server_inverse.svg');
}

.vs-dark .monaco-tree .monaco-tree-rows > .monaco-tree-row > .content > .connection-tile > .icon.server-page,
.hc-black .monaco-tree .monaco-tree-rows > .monaco-tree-row > .content > .connection-tile > .icon.server-page,
.vs-dark .monaco-list .monaco-list-rows > .monaco-list-row .connection-tile > .icon.server-page,
.hc-black .monaco-list .monaco-list-rows > .monaco-list-row .connection-tile > .icon.server-page,
.vs-dark .monaco-tree .monaco-tree-rows > .monaco-tree-row > .content > .connection-profile-container > .icon.server-page,
.hc-black .monaco-tree .monaco-tree-rows > .monaco-tree-row > .content > .connection-profile-container > .icon.server-page,
.vs-dark .monaco-list .monaco-list-rows > .monaco-list-row .connection-profile-container > .icon.server-page,
.hc-black .monaco-list .monaco-list-rows > .monaco-list-row .connection-profile-container > .icon.server-page {
	background-image: url('default_server_inverse.svg');
}

/* loading for OE node */
.server-explorer-viewlet .monaco-tree .monaco-tree-rows > .monaco-tree-row > .codicon.in-progress .connection-tile:before,
.server-explorer-viewlet .monaco-tree .monaco-tree-rows > .monaco-tree-row > .codicon.in-progress .object-element-group:before {
	position: absolute;
	display: block;
	width: 36px;
	height: 100%;
	top: 0;
	left: -35px;
}

.monaco-list .connection-tile .connection-status-badge {
	width: 0.35em;
	height: 0.35em;
	-webkit-border-radius: 50%;
	-moz-border-radius: 50%;
	border-radius: 50%;
	margin-left: 13px;
	margin-top: 10px;
}

/* Connected badge */
.monaco-list .connection-tile .connection-status-badge.connected,
.monaco-list-row .connection-profile .connection-profile-container .icon .connection-status-badge.connected {
	border: 2.4px solid rgba(59, 180, 74, 100%);
	background: rgba(59, 180, 74, 100%);
}

/* Disconnected badge */
.monaco-list .connection-tile .connection-status-badge.disconnected,
.monaco-list-row .connection-profile .connection-profile-container .icon .connection-status-badge.disconnected {
	border: 2.4px solid rgba(208, 46, 0, 100%);
	background: rgba(255, 255, 255, 80%);
}

/* Add connection button */
.server-explorer-viewlet .button-section {
	padding: 20px;
}

/*async tree styles */
.monaco-list-row .async-server-group .async-server-group {
	display: flex;
	align-items: center;
}

.monaco-list-row .async-server-group .async-server-group .async-server-group-container {
	flex: 1;
	margin-right: 5px;
	display: flex;
	height: 100px;
	align-items: center;
	justify-content: center;
	border-radius: 5px;
}

.monaco-list-row .async-server-group .async-server-group .async-server-group-container .icon {
	width: 5px;
	height: 20px;
	border-radius: 2.5px;
}

.monaco-list-row .async-server-group .async-server-group .async-server-group-container .name {
	padding-left: 5px;
	flex: 1;
	overflow: hidden;
	text-overflow: ellipsis;
	height: 25px;
	line-height: 25px;
	font-weight: 500;
}

.monaco-list-row .object-element-container {
	display: flex;
}

.monaco-list-row .object-element-container .label {
	flex: 1;
	overflow: hidden;
	text-overflow: ellipsis;
}

.monaco-list-row .object-element-container .icon {
	flex: 0 30px;
}

.monaco-list-row .connection-profile .connection-profile-container {
	display: flex;
}

.monaco-list-row .connection-profile .connection-profile-container .label {
	flex: 1;
	overflow: hidden;
	text-overflow: ellipsis;
}

.monaco-list-row .connection-profile .connection-profile-container .icon {
	flex: 0 30px;
	position: relative;
}

.monaco-list-row .connection-profile .connection-profile-container .icon .connection-status-badge {
	position: absolute;
	bottom: 0;
	right: 3px;
	width: 4px;
	height: 4px;
	border-radius: 50%;
}

.monaco-tree .monaco-tree-rows > .monaco-tree-row .icon,
.monaco-list .monaco-list-rows > .monaco-list-row .icon {
	background-position: center center;
	background-repeat: no-repeat;
	background-size: 16px 16px;
}

.server-explorer-viewlet .monaco-list .monaco-list-row .actions {
	display: none;
	padding-right: 10px;
}

.server-explorer-viewlet .monaco-list .monaco-list-row .actions .action-label {
	background-size: 14px 14px;
	background-repeat: no-repeat;
	background-position: center;
}

.server-explorer-viewlet .monaco-list .monaco-list-row:hover .actions,
.server-explorer-viewlet .monaco-list .monaco-list-row.selected .actions,
.server-explorer-viewlet .monaco-list .monaco-list-row.focused .actions {
	display: block;
}

.server-explorer-viewlet .monaco-list .async-server-group-container {
	border-top-width: 1px;
	border-top-style: solid;
	border-bottom-width: 1px;
	border-bottom-style: solid;
}

.server-explorer-viewlet .monaco-list:focus .monaco-list-row.selected .async-server-group-container {
	border-top-width: 0px;
	border-bottom-width: 0px;
}
